<?php
require_once("lib/db_connection.php");
$comp_id = $_GET["company_id"];
$exp_date = $_GET["exp_date"];
$pack = $_GET["pack"];
$ctr=0;

$a_part = 0;
$a_tire = 0;
$a_route = 0;

if($pack=="Business")
{
 $a_part = 1;
 $a_tire = 1;
 $a_route = 0;
}
if($pack=="Professional")
{
 $a_part = 1;
 $a_tire = 1;
 $a_route = 1;
}

$query_reac = "UPDATE company_tbl SET approval='1',expiration_date='".$exp_date."',
access_part='".$a_part."',
access_tire='".$a_tire."',
access_route='".$a_route."'
WHERE company_id='".$comp_id."'";
if(mysql_query($query_reac))
{
 $ctr = 1;
}

$query_acc = "UPDATE accounts_tbl SET approval='1' WHERE company_id='".$comp_id."'";
if(mysql_query($query_acc))
{
 $ctr++;
}
?>